﻿using System;
using System.Linq;
using FrameWork.Services;
using System.Windows.Data;
using System.Globalization;

namespace AncheStart.Converter
{
    public class ChannelCheckConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            bool check = (bool)value;
            return check ? "Orange" : "Transparent";
        }
        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            var data = (bool)value;
            if (data)
            {
                return System.Convert.ToInt32(parameter);
            }
            return -1;
        }
    }
}